package nuc.edu.hjx.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import nuc.edu.hjx.pojo.Bgm;
import nuc.edu.hjx.pojo.Users;
import nuc.edu.hjx.pojo.Videos;
import nuc.edu.hjx.service.BgmService;
import nuc.edu.hjx.utils.JSONResult;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.configurationprocessor.json.JSONArray;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;

/**
 * @version : 1.0
 * @auther : hjx
 * @Date : 2021/2/1
 * @Description : nuc.edu.hjx.controller
 */
@RestController
@RequestMapping("/bgm")
@Api(value = "背景音乐接口", tags = "背景音乐的测试接口")
public class BgmController {

    @Autowired
    private BgmService bgmService;

    /**
     * 查询所有的bgm
     * @return List
     */
    @ApiOperation(value = "查询所有的背景音乐", notes = "查询所有gbm的接口")
    @PostMapping("/bgmlist")
    public JSONResult queryAllBgm() {
        return JSONResult.ok(bgmService.queryAllBgm());
    }

}
